package com.example.bbang.service;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MessageProducer {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendOrderMessage(String message, String routingKey) {
        rabbitTemplate.convertAndSend("orderExchange", routingKey, message);
    }
}
